export const TableBody = (props) => {
    const {tableData,removeRow} = props;
    const rows = tableData.map((row, index) => {
        return (
            <tr key={index}>
                <td>{row.id}</td>
                <td>{row.name}</td>
                <td>{row.age}</td>
                <td>
                    <button onClick={()=>{removeRow(index)}}>删除</button>
                </td>
            </tr>
        )
    });
    return <tbody>{rows}</tbody>
}